import { BridgeMessage } from "../types";

// 验证消息格式
export function validateMessage(message: any): message is BridgeMessage {
  return (
    message &&
    typeof message === "object" &&
    typeof message.id === "string" &&
    typeof message.type === "string" &&
    typeof message.namespace === "string" &&
    typeof message.timestamp === "number"
  );
}
